<%
# this partial expects:
# * project
# * user
# * issue
-%>
<span id="adoption">
  <% if issue.owners.include? user -%>
    <%= link_to_remote 'Disown this Issue',
                        :url => {
                            :controller => :issues, :action => :update_actions,
                            :id => issue.local_id, :project_id => project.name,
                            :a => 0
                          },
                        :method => :post %>

  <% else -%>
    <%= link_to_remote 'Adopt this Issue',
                        :url => {
                            :controller => :issues, :action => :update_actions,
                            :id => issue.local_id, :project_id => project.name,
                            :a => 1
                          },
                        :method => :post %>
  <% end -%>
</span>
